home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 4
/
Amiga Tools 4.iso
/
tools
/
internet-tools
/
internet-install-tools
/
varknet3
/
net3.lha
/
AmiTCP-4.0
/
bin
/
SynClock
< prev
next >
Wrap
AmigaDOS Script File
|
1994-05-27
|
719b
|
32 lines
.KEY HOST/A,SAVE/S
.BRA {
.KET }
; $Id: SynClock,v 3.1 1994/05/27 07:08:39 jraja Exp $
; $VER: SynClock 3.1 (27.5.1993)
; Set your amiga clock from host in network.
; if someone finds a way to get DAY
; locale (in)dependent way, (and fast)
; please tell me (too@cs.hut.fi)
Assign >NIL: TCP: exists
if warn
echo TCP: not mounted.
quit 10
endif
rx "Address 'COMMAND'; months='JanFebMarAprMayJunJulAugSepOctNovDec' +
If ~Open(dt, 'TCP:{HOST}/daytime', 'R') Then +
Do; Say '*** Service not present'; Exit 10; End +
d = readln(dt) +
tim = SubWord(d, 4, 1) +
month=(Pos(SubWord(d, 2, 1), months) + 2) / 3 +
Date TIME tim DATE SubWord(d, 3, 1)'-'month'-'SubStr(d, 23, 2)
If {SAVE}
SetClock SAVE
EndIf